package com.gzist.security4.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @TableName role
 * @Author: 黄泽建
 */
@TableName(value ="role")
@Data
@ApiModel("角色类")
public class Role implements Serializable {
    /**
     * 角色id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("角色id")
    private Long id;

    /**
     * 角色昵称
     */
    @TableField(value = "role_name")
    @ApiModelProperty("角色昵称")
    private String role_name;

    /**
     * 角色标识
     */
    @TableField(value = "role_label")
    @ApiModelProperty("角色标识")
    private String role_label;

    /**
     * 角色是否删除
     */
    @TableField(value = "deleted")
    @TableLogic
    @ApiModelProperty("角色是否删除")
    private Integer deleted;

    /**
     * 角色创建时间
     */
    @TableField(value = "created_time")
    @ApiModelProperty("角色创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime created_time;

    /**
     * 角色更新时间
     */
    @TableField(value = "updated_time")
    @ApiModelProperty("角色更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updated_time;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}